<html>
<?php include("../../MerchandiseBay/conn.php"); ?>
<head>
<?

$sql="select * from model order by kind";
$qry=mysql_query($sql,$conn);
?>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Title</title>



</head>

<body bgcolor="#330000">



<div align="left">
  <table border="0" width="100%" id="table1">
    <tr>
      
      <td background="../mc/images/background/menuE.gif" height="34"> <div align="left"><font color="#FFFF00" size="6" face="Verdana"><strong><font size="4">List Model </font></strong></font></div></td>
    </tr>
    <tr>
      <td>
        <table border="1" width="100%" bgcolor="#EEEEEE" style="border-collapse: collapse" bordercolor="#808080" id="table2">
          <tr>
            <td>
              
  <table border="0" width="103%" id="table3">
    <tr>
      <td width="32" bgcolor="#333333"><font color="#FFFFFF"><strong>No</strong></font></td>
      <td width="239" bgcolor="#333333"><font color="#FFFFFF"><strong>Model</strong></font></td>
		  <td width="198" bgcolor="#333333"><b><font color="#FFFFFF" size="2" face="Verdana">Kind</font></b></td>
	              <td width="244" bgcolor="#333333"><b> <font color="#FFFFFF" size="2" face="Verdana">Category</font></b></td>
	              <td width="480" bgcolor="#333333"><div align="center"><b> <font size="2" face="Verdana" color="#FFFFFF">&nbsp;Update</font></b></div></td>
	  </tr>
    <?
	$count=1;
	while($row=mysql_fetch_assoc($qry)){
	//untuk ambil data pada row
	$d=$row['id'];
	//$row['id'] untuk ambil no id daripada database model
	?>
    <tr>
      <td width="32"><?=$count?></td>
      <td width="239"><font size="2" face="Verdana"><?=$row['model']?>
      </font></td>
		  <td><font size="2" face="Verdana"><?=$row['kind']?></font></td>
		  <td width="244"><font size="2" face="Verdana"><?=$row['category']?></font></td>
		  <td width="480"><div align="center"><font size="2" face="Verdana">&nbsp;Edit&nbsp;<a href="editModel.php?d=<?=$d?>&category=<?=$row['category']?>&kind=<?=$row['kind']?>&model=<?=$row['model']?>"><img border="0" src="icon/note_edit.png" width="24" height="24"></a> 
                      / 
                      <? // nilai $d diambil untuk pilih data untuk diedit?>
                      Delete<? //t untuk mengklasifikasikan data dari bahagian mne yg diambil ?>
                      <a href="delete.php?d=<?=$d?>&t=model"><img border="0" src="icon/note_delete.png" width="24" height="24"></a></font></div></td>
	  </tr><? // nilai $d diambil untuk pilih data untuk dipadaam...nilai d dengan t dihantar ke page lain?>
    <?
	$count=$count+1;
	}?>
    <tr>
      <td width="32">&nbsp;</td>
      <td width="239">&nbsp;</td>
		  <td>&nbsp;</td>
		  <td width="244">&nbsp;</td>
		  <td width="480">&nbsp;</td>
	  </tr>
  </table>			  </td>
	      </tr>
        </table>	    </td>
    </tr>
    <tr>
      <td>
        <p align="center"><font face="Verdana" size="2"><a href="registerProduct.php" target="_parent"><font color="#FFFFFF">Register Product</font></a> 
            <font color="#FFFFFF">|</font> <a href="modelForm.php"><font color="#FFFFFF">Add Model </font></a></font></td>
    </tr>
  </table>
</div>
</body>

</html>
